package com.onlyphoto.onlymall.mvp.model

import com.onlyphoto.onlymall.api.Urls
import com.onlyphoto.onlymall.base.BaseModel
import com.onlyphoto.onlymall.base.BaseObserver
import com.onlyphoto.onlymall.bean.response.OrderBean
import com.onlyphoto.onlymall.utils.ConfigUtil
import com.onlyphoto.onlymall.utils.RxTransformer


class MOrdersImpl : BaseModel() {
    fun requestOrders(status: Int, pageNum: Int, baseObserver: BaseObserver<ArrayList<OrderBean>>) {
        val url = ConfigUtil.instance.getUrl(Urls.GOODS_ORDER)
        apiService().order(url, 1, status, pageNum)
                .compose(RxTransformer.switchSchedulers(this))
                .subscribe(baseObserver)
    }
}
